/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.service.api;

import com.koron.common.bean.StaffBean;
import com.koron.common.domain.DataBean;
import com.koron.scene.domain.*;
import org.koron.ebs.mybatis.SessionFactory;
import org.springframework.web.multipart.MultipartFile;
import org.swan.bean.MessageBean;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface DangerousOperationService {

    MessageBean<Integer> save(DangerousOperation bean, StaffBean user, DangerousOperationApprover approver, DangerousOperationFile fileBean);

    MessageBean<Integer> saveByQrCode(DangerousOperation bean, StaffBean user, String approver, DangerousOperationFile fileBean);

    MessageBean<Integer> delete(String id, StaffBean user);

    MessageBean<DangerousOperationBean> queryOne(String id);

    MessageBean<DataBean<DangerousOperation>> list(String corpCode, String operationCategory, String operationTicketType, String operationCategoryName, String operationTicketTypeName,String operationCode,Integer status, String startTime, String endTime, Integer start, Integer pageSize,String keyword);

    MessageBean<?> getProcessData(String ids);

    Integer check(Integer category, Integer type);

    MessageBean<List<SafetyMeasure>> getAllSafetyMeasure(Integer operationCategory, Integer operationTicketType);

    MessageBean<List<RiskIdentificationAndMeasures>> getAllRiskIdentificationAndMeasures(Integer operationCategory, Integer operationTicketType);

    MessageBean<List<OperationType>> getAllOperationType(Integer operationCategory, Integer operationTicketType);

    MessageBean<List<PersonalProtectionAndEmergency>> getAllProtectionAndEmergency(Integer operationCategory, Integer operationTicketType);

    MessageBean<DangerousOperationVo> getDangerousOperation(String id);

    MessageBean<Integer> disclosure(SessionFactory factory, StaffBean user, String id, MultipartFile[] disclosureFiles);

    MessageBean<Integer> confirm(StaffBean user, String id, String completionDescription, String completionTime, String personInCharge, String personInChargeName, String completionConfirmer, String completionConfirmerName);

    MessageBean<List<DangerousOperationAnalysisBean>> dangerousOperationAnalysis(String corpCode, Integer status, String startTime, String endTime);

    MessageBean<List<DangerousOperationAnalysis>> analysis(String code, String startTime, String endTime);

    List<DangerousOperationFlowNode> getFlowMessage(String id, Date updateTime);

    MessageBean<Integer> delay(StaffBean user, String id, Date delayDate, String delayDescription, DangerousOperationApprover approver);

    String getCode(SessionFactory factory);

    MessageBean<Integer> flowSave(DangerousOperation bean,DangerousOperationFile fileBean, StaffBean user);

    MessageBean<Map> getUserCorpAndOperationCategory(StaffBean user);

    MessageBean<List<StaffBean>> getStaffByCertificate(SessionFactory factory, String corpCode, String certificateTypeName);

    /**
     * 作业票列表导出
     * @param corpCode
     * @param operationTicketType
     * @param startTime
     * @param endTime
     * @return
     */
    List<DangerousOperationVo> exportList(String corpCode, String operationTicketType,String operationCode,Integer status, String startTime, String endTime);

    MessageBean<DataBean<DangerousOperation>> homePageOperationList(String corpCode, String operationCategory, String operationTicketType, String operationCategoryName, String operationTicketTypeName, String operationCode, Integer status, String startTime, String endTime, Integer start, Integer pageSize);

    MessageBean<Integer> flowSignSave(SessionFactory factory, StaffBean user,String id, MultipartFile[] files);
}
